<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<html>
	<head>
		<style type="text/css">
		a{
			text-decoration:none;
		}
		#Myrecieve_div{
			margin: 20px;
			margin-left: 80px;
			
		}
		.div_info{
			width: 90%;
			margin-bottom:8px;
			height: 22px;
		}
		.div_info_content{
			padding-top:2px;
			padding-left:4px;
			width: 35%;
			height: 22px;
			border: 1px solid black;
			float: left;
		}
		.div_info_date{
			padding-left:4px;
			padding-top:2px;
			width: 40%;
			height: 22px;
			border: 1px solid black;
			float: left;
			margin-left: -1px;
		}
		.div_info_receiveUser{
		padding-left:4px;
			padding-top:2px;
			width: 16%;
			height: 22px;
			border: 1px solid black;
			float: left;
			margin-left: -1px;
		}
		</style>
		<script type="text/javascript">
			function ok(){
				window.parent.location.href="complaint_tosendlist.action";
			}
		</script>
		<script type="text/javascript">
			function ok(){
				window.location.href="complaint_tosendlist.action";
			}
		</script>
	</head>
	<body>
		<div id="">
			<div style="text-align: center;"><h2>我收到的消息</h2></div>
			<div style="text-align: right;width: 80%;"><a href="information_sendlist.action" target="xiaoxi_frame">查看发送的信息</a></div>
			<div id="Myrecieve_div">
				<c:choose>
					<c:when test="${empty informations}">
						<h3>您没有收到消息</h3>
					</c:when>
					<c:otherwise>
						<c:forEach items="${informations}" var="information" varStatus="status">
							<div class="div_info">
								<div class="div_info_content">
									<a style="text-decoration:none;" href="information_recievedetail.action?comscript=${status.count}" target="xiaoxi_frame">
										<c:set var="subStr" value="${information.content}"/>  
					                     <c:choose>   
					                            <c:when test="${fn:length(subStr) > 10}">   
					                                	<c:out value="消息内容 :  ${fn:substring(subStr, 0, 10)}..." />   
					                            </c:when>   
					                            <c:otherwise>   
					                                   <c:out value="消息内容 :  ${subStr}" />   
					                        	</c:otherwise>   
					                     </c:choose>
									</a>
								</div>
								<div class="div_info_date">
									发送日期 :${information.date}
								</div>
								<div class="div_info_receiveUser">
									 发送人:"${information.sendUser.detailUser.nickName}"
								</div>
							</div>			
						</c:forEach>
					</c:otherwise>
				</c:choose>
			</div>
		</div>
	</body>
</html>
